package app.caihan.scframe.common.loadinghelper

import androidx.annotation.MainThread

/**
 * loadinghelper三方库所使用的ToolBar工具类
 *
 * @author Seven-C
 * @date 2020/8/3
 */
object ToolbarUtils {

    @MainThread
    fun setBaseToolbarAdapter(
        loadingHelper: LoadingHelper,
        config: ToolbarConfig
    ): LoadingHelper {
        loadingHelper.setDecorAdapter(BaseToolbarAdapter(config))
        return loadingHelper
    }

    @MainThread
    fun setToolbar(
        loadingHelper: LoadingHelper,
        config: ToolbarConfig
    ): LoadingHelper {
        loadingHelper.setDecorAdapter(OnlyToolbarAdapter(config))
        return loadingHelper
    }

}